//
//  Game.m
//  模版模式
//
//  Created by flannery on 2018/12/18.
//  Copyright © 2018年 flannery. All rights reserved.
//

#import "Game.h"

@implementation Game

-(void)initialize{}
-(void)startPlay{}
-(void)endPlay{}
//模版
-(void)play{
    // 初始化游戏
    [self initialize];
    // 开始游戏
    [self startPlay];
    // 结束游戏
    [self endPlay];
}
@end

@implementation Cricket
-(void)initialize{
    NSLog(@"Cricket Game Initialized! Start playing.");
}
-(void)startPlay{
    NSLog(@"Cricket Game Started. Enjoy the game!");
}
-(void)endPlay{
    NSLog(@"Cricket Game Finished!");
}
- (void)play{
    [super play];
}
@end

@implementation Football
-(void)initialize{
    NSLog(@"Football Game Initialized! Start playing.");
}
-(void)startPlay{
    NSLog(@"Football Game Started. Enjoy the game!");
}
-(void)endPlay{
    NSLog(@"Football Game Finished!");
}
- (void)play{
    [super play];
}
@end


